The form descriptions have a page root element.
Caption: Below, a tagx,y indication indicates that the element has the tag chile a minimum of x times and maximum of y times.
Description of the XML tags here :
A cell element is an abstract element. It does not exists as such but describes a structure common to other elements. It lets you describe the foreground style and the display formula.
display (optional)
Display formula of the [type]:[param] form. If the evaluation of the display form does not allow the display of a block, it will not be visible even in the source code of the HTML page. The supported types are:
Corresponds to a display formula that evaluates if the document is already crossed by the specified step whose system name is used for the element [param].
Example: display="stageused:demande"
Corresponds to a display formula that evaluates whether or not a field has already been offered for modification to a user. [param] corresponds to the system name of the field.
Example : display="fieldused:DateDebut"
variable
Corresponds to a display formula that evaluates the Boolean value of a javascript global variable of the script block. If the variable value is 'true', the element will be displayed else the element will not be displayed.
If the value is not Boolean, the false value will be used (therefore the element will be hidden). [param] corresponds to the javascript variable name.
Example: In the script block "var display_demande = " => display="variable:display_demande"
variableisfalse
Works in the same manner as the "variable" option, except that it lets display the element only if the variable is "false".
So it is possible to reuse the same variable to display different elements, or a field in read or write mode only depending on certain rights.
none
Example of displaying elements according to the belonging of the user to a role
<page> <script><![CDATA[ var role = iWorkflowModule.getRole( iContext, iWorkflowInstance.getCatalog(), "Vérificateur" ); var user_has_right = false; if ( iUser.isMemberOf(role,true) ) { user_has_right = true; } ]]></script> <body> <section ...> <line display="variable:user_has_right"> <field display="variable:user_has_right" property="HL_Contact" ctrl="text" mode="write" required="true"/> <field display="variableisfalse:user_has_right" property="HL_Contact" mode="read" ctrl="text" required="true"/> </line> </section> </body> </page>
A container element is an abstract element. It does not exists as such but describes a structure common to other elements. It lets you nest the elements within themselves and can contain:
In some cases, it may contain a list of several field and/or text and/or html elements with the aim of concatenating different elements into a single sentence. But all types of field element may not necessarily be supported since some lead to a carriage return.
innerClass (optional)
Customization of the foreground CSS style.
cellspacing (optional)
Spacing between cells (identical to the HTML attribute of the same name) example : cellspacing="5px"
cellpadding (optional)
Internal cell margins (identical to the HTML attribute of the same name) Example: cellpadding="10px"
The page element is the root element of a form. It can contain the script, header, body and footer elements. But like this version, the header and footer cannot be modified, the header and footer elements are not supported.
The script element contains Java Script code to be evaluated on the server side while displaying the form. This code is only evaluated when the form is first displayed and the values of the variables can be used by all the form elements. For example, this can be a display form that defined whether or not an element is visible.
Keywords API SDK
Keyword | Class | Description |
iWorkflowModule | com.axemble.vdoc.sdk.modules.IWorkflowModule | Workflow module |
iUser | com.axemble.vdoc.sdk.interfaces.IUser | Logged In User |
iContext | com.axemble.vdoc.sdk.interfaces.IContext | Context of the logged in user |
iWorkflowInstance | com.axemble.vdoc.sdk.interfaces.IWorkflowInstance | Active document |
iResource | com.axemble.vdoc.sdk.interfaces.IResource | Active resource. Mainly valid in the dynamic tables context. |
iTaskInstance | com.axemble.vdoc.sdk.interfaces.ITaskInstance | Active task |
iAction | com.axemble.vdoc.sdk.interfaces.IAction | Current action Valid for the step change |
Browsing keywords
Keyword | Class | Description |
navigator | com.axemble.vdp.ui.framework.controls.Navigator | Navigation object Only available in the web forms From this object, it is possible to recover the service manager, the execution context IExecutionContext. |
skinUrl | java.lang.String | URL of the skin Only available in the web forms |
showHelpButton | java.lang.Boolean | Display of the help image button. Only available in the web forms |
converter | com.axemble.vdp.services.tools.ConverterService | Enables to convert elements of different types in string. |
Format | com.axemble.vdp.localization.interfaces.IFormatService | Enables to define the elements display format |
log | com.axemble.vdp.utils.Logger | Enables to insert log message in the scripts Needed for the specific developments |
language | java.lang.String | Current language used |
baseUrl | java.lang.String | Root URL |
applicationUrl | java.lang.String | Application URL |
Some examples of using keywords
// recover the previous field value var oldValue = iWorkflowInstance.getValue("Total"); // position the new value of a field iWorkflowInstance.setValue("Total", newValue);
Available functions
Method | Description |
function alert( msg ); | Display an alert message. |
function setValue( String propertyName, Object value ); | Position the value of a current document field. |
function getValue( String propertyName ); | Recover the value of a current document field. |
function setValue( CoreDocument document, String propertyName, Object value ); | Position the value of a specified document field. Case of dynamic tables |
function getValue( CoreDocument document, String propertyName ); | Recover the value of a specified document field. |
function getStringValue( String propertyName ); | Return a character string value. |
function getHtmlValue( String propertyName ); | Return a HTML value. |
function show( String id, boolean visible ); | Display or hide an identified element. Case of fragments too |
function setHtml( String id, String html ); | Position the content of a HTML element. |
function toHtml( String text ); | Convert a character string in HTML format. |
function toAttribute( String text ); | Convert a character string in HTML attribute format. |
function toTextArea( String text ); | Convert a character string in text area format. |
function toJSString( String text ); | Convert a character string in JavaScript format. |
Available advanced functions
Method | Description |
function getConnection( String reference ); | Recover a JDBC connection from a given reference. If the reference is null, the connection will correspond to the VDoc base. |
function sqlQuery( String reference, String order, Object[] parameters ); | Position the value of a current document field. |
function getValue( String propertyName ); | Recover the value of a current document field. |
The conversion class « converter » lets you convert an object into a character string that can be displayed based on user context (language, date and number format).
Available methods
public String object(Object obj); public String object(Object obj,int size); public String onlyDate(Date date,int size); public String onlyTime(Date date,int size); public String resourceValue(Resource resource, String propertyName); public String resourceValue(Resource resource, String propertyName, int size);
The parameters
Available size values
Keyword | Value | Rendering |
SHORT | 1 | 21/07/2004 15:50 |
MEDIUM | 2 | 21 juil 2004 15:50 |
LONG | 3 | 21 juillet 2004 15:50:42 |
FULL | 4 | mercredi 21 juillet 2004 15:50:42 CET |
Some examples
// converting a character string var /*String*/ displayDate = converter.object(date,1/*SHORT*/); // recover a character string translated in the file strings_global.xml from an // identifier var /*String*/ msg = converter.sysString("LG_DECISION");
The format class « format » lets get the user conversion context, as the active language (ex. format.getLanguage()).
Available methods
Method | Description |
public String getLanguage(); | Recovering the language |
public Locale getLocale(); | Recovering the local |
public Calendar getCalendar(); | Recovering the calendar |
public DateFormat getShortDateFormat(); | Recovering a date format |
public DateFormat getMediumDateFormat(); | |
public DateFormat getLongDateFormat(); | |
public DateFormat getFullDateFormat(); | |
public DateFormat getShortTimeFormat(); | |
public DateFormat getMediumTimeFormat(); | |
public DateFormat getLongTimeFormat(); | |
public DateFormat getFullTimeFormat(); | |
public DateFormat getShortDateTimeFormat(); | |
public DateFormat getMediumDateTimeFormat(); | |
public DateFormat getLongDateTimeFormat(); | |
public DateFormat getFullDateTimeFormat(); | |
public DecimalFormat getIntegerNumberFormat(); | Recovering a complete digital format |
public DecimalFormat getDecimalNumberFormat(); | Recovering a decimal digital format |
public DecimalFormat getCurrencyNumberFormat(); | Recovering a currency format |